<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="peoit" tagdir="/WEB-INF/tags"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<peoit:include>
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
		项目管理<span class="c-gray en">&gt;</span> 设置保证金<a
			class="btn btn-success radius r mr-20"
			style="line-height: 1.6em; margin-top: 3px"
			href="<c:url value ="/admin/project/list/0"/>" title="返回"><i
			class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="pd-20">
		<form id="updateEarnestPercent"
			action="<c:url value="/admin/project/updateEarnestPercent"/>">
			<table
				class="table table-border table-bordered table-hover table-bg table-sort"
				id="content">
				<thead>
					<tr class="text-c">
						<th width="20%">项目名称</th>
						<th width="100"><input type="hidden" name="projectId"
							value="${viewData.id}" />${viewData.projectName }</th>
					</tr>

					<tr class="text-c">
						<th width="20%">投资保证金比例</th>
						<th width="80%"><input type="text"
							id="investorEarnestPercent" name="investorEarnestPercent"
							value="${viewData.investorEarnestPercent*100}" class="required" />
							%</th>
					</tr>
					<tr class="text-c">
						<th width="20%">项目保证金比例</th>
						<th width="80%"><input type="text" id="projectEarnestPercent"
							name="projectEarnestPercent"
							value="${viewData.projectEarnestPercent*100}" class="required" />
							%</th>
					</tr>
					<tr class="text-c">
						<th width="20%" colspan="2"><input id="earnest_submit"
							type="button" value="保存" class="btn btn-success radius r mr-60"></th>
					</tr>
				</thead>
				<tbody>
				</tbody>
			</table>
		</form>
	</div>
</peoit:include>
<script type="text/javascript">
	$(function() {
		$("#earnest_submit").click(
				function() {
					if (isNaN($("#investorEarnestPercent").val())
							|| isNaN($("#projectEarnestPercent").val())) {
						layer.msg("请录入正确的保证金比例", {
							icon : 5,
							time : 1000
						});
						return;
					}
					$("#updateEarnestPercent").submit();
				});

	});
</script>